/* 主页样式 */
.home-container {
    min-height: 100vh;
    position: relative;
    width: 100%;
}

/* 隐藏式标签侧边栏 */
.hidden-tab-sidebar {
    position: fixed;
    left: -1.5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px 0;
}

/* 侧边栏标签 */
.sidebar-tab {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* 标签指示器（小标签提示） */
.tab-indicator {
    width: 8px;
    height: 40px;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

/* 标签指示器悬浮效果 */
.sidebar-tab:hover .tab-indicator {
    width: 12px;
    height: 48px;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.2);
    border-top: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    border-right: 2px solid rgba(255, 255, 255, 0.4);
}

/* 品牌指示器 */
.brand-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: brandGlow 3s ease-in-out infinite;
}

@keyframes brandGlow {
    0%, 100% {
        box-shadow: 2px 0 8px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 3px 0 15px rgba(102, 126, 234, 0.6);
    }
}

/* 首页指示器 */
.home-indicator {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.home-indicator.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 3px 0 12px rgba(102, 126, 234, 0.5);
}

/* 分类指示器 */
.categories-indicator {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.categories-indicator.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 3px 0 12px rgba(102, 126, 234, 0.5);
}

/* 收藏指示器 */
.bookmarks-indicator {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.bookmarks-indicator.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 3px 0 12px rgba(102, 126, 234, 0.5);
}

/* 个人信息指示器 */
.profile-indicator {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.profile-indicator.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 3px 0 12px rgba(102, 126, 234, 0.5);
}

/* 退出指示器 */
.logout-indicator {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

/* 标签内容 */
.tab-content {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 20px 12px 16px;
    border-radius: 0 15px 15px 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-50%) translateX(-25px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
    z-index: 1;
    backdrop-filter: blur(12px);
    min-width: 120px;
    max-width: 200px;
    border-left: 3px solid rgba(255, 255, 255, 0.4);
}

.tab-content.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

/* 侧边栏品牌内容样式 */
.hidden-tab-sidebar .brand-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hidden-tab-sidebar .brand-content .content-icon {
    color: #fff;
}

.hidden-tab-sidebar .brand-content .brand-info h3 {
    color: white;
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
}

.hidden-tab-sidebar .brand-content .brand-info p {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

/* 侧边栏首页内容样式 */
.hidden-tab-sidebar .home-content {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.9) 0%, rgba(0, 242, 254, 0.9) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 侧边栏分类内容样式 */
.hidden-tab-sidebar .categories-content {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.9) 0%, rgba(56, 249, 215, 0.9) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 侧边栏收藏内容样式 */
.hidden-tab-sidebar .bookmarks-content {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.9) 0%, rgba(254, 225, 64, 0.9) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 侧边栏个人信息内容样式 */
.hidden-tab-sidebar .profile-content {
    background: linear-gradient(135deg, rgba(168, 237, 234, 0.9) 0%, rgba(254, 214, 227, 0.9) 100%);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* 侧边栏退出内容样式 */
.hidden-tab-sidebar .logout-content {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(238, 90, 36, 0.9) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 内容头部 */
.content-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
}

.content-info {
    flex: 1;
}

.tab-text {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.2;
}

.tab-desc {
    margin: 0;
    font-size: 10px;
    opacity: 0.8;
    line-height: 1.2;
}

/* 悬浮动画效果 */
.sidebar-tab:hover {
    transform: translateX(2px);
}

/* 旧导航栏样式已移除，使用新的标签式侧边栏 */

/* 主内容区 */
.main-content {
    width: 100%;
    padding: 32px;
    min-height: 100vh;
}

/* 首页内容 */
.home-content {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    text-align: center;
    margin-bottom: 48px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
}

/* 分类展示区 */
.categories-showcase {
    margin-bottom: 48px;
}

.categories-showcase h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.category-card {
    background: linear-gradient(135deg,
        rgba(255, 240, 245, 0.9) 0%,
        rgba(240, 248, 255, 0.9) 30%,
        rgba(248, 240, 255, 0.9) 60%,
        rgba(255, 245, 238, 0.9) 100%);
    border-radius: 25px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg,
        #ff6b9d 0%,
        #c44569 25%,
        #667eea 50%,
        #764ba2 75%,
        #f093fb 100%);
    border-radius: 25px 25px 0 0;
}

.category-card::after {
    content: '🌟';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 18px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8) rotate(-15deg);
}

.category-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.category-card:hover::after {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.category-header i {
    font-size: 1.5rem;
    color: #667eea;
}

.category-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    margin-left: 12px;
}

.bookmark-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.category-bookmarks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bookmark-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bookmark-preview:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

.bookmark-preview i {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 10px;
}

.bookmark-preview span {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.more-bookmarks {
    text-align: center;
    padding: 8px;
    color: #667eea;
    font-size: 12px;
    font-weight: 600;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    margin-top: 4px;
}

/* 首页分类树样式 */
.home-category-tree {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.home-category-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-left: 32px;
    padding-left: 16px;
    border-left: 3px solid rgba(102, 126, 234, 0.2);
    position: relative;
}

.subcategories-grid::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.subcategories-grid .category-card {
    transform: scale(0.95);
    border-left: 3px solid #764ba2;
}

.subcategories-grid .category-card:hover {
    transform: scale(0.98) translateY(-4px);
}

.subcategory-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg,
        rgba(255, 245, 238, 0.9) 0%,
        rgba(255, 228, 225, 0.9) 50%,
        rgba(240, 248, 255, 0.9) 100%);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #ff6b9d 0%,
        #c44569 25%,
        #667eea 50%,
        #764ba2 75%,
        #f093fb 100%);
    border-radius: 25px 25px 0 0;
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.create-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.3);
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
}

/* 欢迎弹窗 */
.welcome-modal {
    background: white;
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalBounceIn 0.6s ease;
}

@keyframes modalBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.welcome-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.welcome-content p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 24px;
}

.welcome-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 600;
}

.stat-item i {
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .nav-user {
        order: 2;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .welcome-modal {
        padding: 24px;
    }
    
    .welcome-stats {
        flex-direction: column;
        gap: 12px;
    }
}

/* 分类树样式 */
.categories-tree-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 树形头部 */
.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.categories-tree-section h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 树形控制按钮 */
.tree-controls {
    display: flex;
    gap: 10px;
}

.tree-control-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tree-control-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.tree-control-btn i {
    font-size: 10px;
}

/* 分类树容器 */
.category-tree-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 分类树项目 */
.category-tree-item {
    position: relative;
}

/* 分类节点 */
.category-node {
    display: flex;
    align-items: center;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
}

/* 分类主要内容 */
.category-main {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

/* 分类切换按钮 */
.category-toggle {
    padding: 20px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 0 15px 15px 0;
}

.category-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

.category-toggle i {
    font-size: 14px;
    color: #667eea;
    transition: transform 0.3s ease;
}

.category-toggle i.rotated {
    transform: rotate(180deg);
}

/* 根分类样式 */
.root-category {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
}

.root-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.root-category .category-main:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* 子分类样式 */
.sub-category {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.15);
    margin-left: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sub-category:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.sub-category .category-main:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* 三级分类样式 */
.sub-sub-category {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.1);
    margin-left: 60px;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.sub-sub-category:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.sub-sub-category .category-main:hover {
    background: rgba(102, 126, 234, 0.03);
}

/* 四级分类样式 */
.sub-sub-sub-category {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(102, 126, 234, 0.08);
    margin-left: 80px;
    margin-top: 8px;
    padding: 12px 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sub-sub-sub-category:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.08);
    background: rgba(102, 126, 234, 0.02);
}

.sub-sub-sub-category .category-icon {
    background: rgba(102, 126, 234, 0.08);
    font-size: 14px;
    width: 28px;
    height: 28px;
}

.sub-sub-sub-category .category-name {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.sub-sub-sub-category .category-path {
    font-size: 11px;
    color: #888;
}

.sub-sub-sub-category .bookmark-count {
    font-size: 11px;
    color: #667eea;
}



/* 分类图标 */
.category-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.1);
}

.root-category .category-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
}

.sub-category .category-icon {
    background: rgba(102, 126, 234, 0.15);
    font-size: 18px;
}

.sub-sub-category .category-icon {
    background: rgba(102, 126, 234, 0.1);
    font-size: 16px;
    width: 32px;
    height: 32px;
}

/* 分类信息 */
.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-name {
    margin: 0;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.root-category .category-name {
    font-size: 18px;
    color: #667eea;
}

.sub-category .category-name {
    font-size: 16px;
}

.sub-sub-category .category-name {
    font-size: 14px;
}

.category-path {
    font-size: 12px;
    color: #666;
    opacity: 0.8;
}

.bookmark-count {
    font-size: 11px;
    color: #667eea;
    font-weight: 500;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
}

/* 分类箭头 */
.category-arrow {
    color: #667eea;
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.category-node:hover .category-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* 子分类容器 */
.subcategories {
    position: relative;
    margin-top: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.subcategories.expanded {
    max-height: 2000px; /* 足够大的值来容纳所有子分类 */
    opacity: 1;
}

/* 三级分类容器 */
.sub-subcategories {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 1px dashed rgba(102, 126, 234, 0.3);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.sub-subcategories.expanded {
    max-height: 1000px;
    opacity: 1;
}

/* 四级分类容器 */
.sub-sub-subcategories {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 1px dashed rgba(102, 126, 234, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.sub-sub-subcategories.expanded {
    max-height: 500px;
    opacity: 1;
}

/* 树形连接线 */
.tree-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #667eea, rgba(102, 126, 234, 0.3));
    border-radius: 1px;
}

/* 子分类列表 */
.subcategory-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

/* 分类连接器 */
.category-connector {
    position: absolute;
    left: -25px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: #667eea;
    border-radius: 1px;
    transform: translateY(-50%);
}

.category-connector::before {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #667eea;
    border-radius: 50%;
    transform: translateY(-50%);
}

.category-connector.small {
    width: 15px;
    left: -20px;
}

.category-connector.small::before {
    width: 4px;
    height: 4px;
    right: -2px;
}

.category-connector.tiny {
    width: 12px;
    left: -18px;
}

.category-connector.tiny::before {
    width: 3px;
    height: 3px;
    right: -1px;
}



/* 空状态 */
.empty-categories {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-categories i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-categories h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.empty-categories p {
    margin: 0 0 30px 0;
    font-size: 16px;
}

.create-category-btn {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.create-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

/* 分类收藏页面样式 */
.category-bookmarks-content .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.header-left {
    flex: 1;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.create-bookmark-btn {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-bookmark-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

/* 顶级分类展示 */
.root-categories {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}









/* 子技能节点 */
.skill-nodes {
    position: relative;
    z-index: 2;
}

.child-skill {
    position: absolute;
    transform: translate(-50%, -50%);
}

.child-skill .skill-icon {
    width: 60px;
    height: 60px;
    border-width: 2px;
}

.child-skill .skill-emoji {
    font-size: 24px;
}

.child-skill .skill-level {
    width: 20px;
    height: 20px;
    font-size: 10px;
    bottom: -3px;
    right: -3px;
}

.child-skill .skill-name {
    font-size: 12px;
    max-width: 80px;
}

/* 未解锁状态 */
.child-skill:not(.unlocked) .skill-icon {
    border-color: rgba(100, 100, 100, 0.5);
    background: rgba(50, 50, 50, 0.3);
}

.child-skill:not(.unlocked) .skill-emoji {
    filter: grayscale(100%) brightness(0.5);
}

.child-skill:not(.unlocked) .skill-name {
    color: rgba(150, 150, 150, 0.7);
}

/* 激活状态 */
.child-skill.active .skill-icon {
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 237, 78, 0.3) 100%);
}

.child-skill.active .icon-glow {
    opacity: 0.6;
    animation: pulse 1s infinite;
}

/* 技能提示框 */
.skill-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(30, 30, 60, 0.95) 100%);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    min-width: 200px;
    max-width: 300px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 20;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.child-skill:hover .skill-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.tooltip-header h4 {
    margin: 0;
    color: #ffd700;
    font-size: 16px;
    font-weight: 600;
}

.skill-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.tooltip-content p {
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.4;
}

.skill-stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
}

.tooltip-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    text-align: center;
}

.tooltip-footer small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

/* 提示框箭头 */
.skill-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 215, 0, 0.3);
}

.skill-tooltip::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 0, 0, 0.95);
}

/* 关闭按钮 */
.close-skill-tree {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.close-skill-tree:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.tree-line {
    stroke: #667eea;
    stroke-width: 2;
    fill: none;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tree-line.highlighted {
    stroke: #764ba2;
    stroke-width: 3;
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(118, 75, 162, 0.5));
}

/* 分类节点 */
.tree-nodes {
    position: relative;
    z-index: 2;
}

.tree-node {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
}

.tree-node:hover {
    transform: translate(-50%, -50%) scale(1.05);
    z-index: 10;
}

.node-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
    transition: all 0.3s ease;
}

.tree-node:hover .node-content {
    border-color: #667eea;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
}

.root-node .node-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    font-weight: 600;
}

.child-node .node-content {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
}

.node-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.node-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.node-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.node-count {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

/* 节点提示框 */
.node-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 20;
    margin-top: 10px;
}

.tree-node:hover .node-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

.node-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.9);
}

/* 分类收藏页面样式 */
.category-bookmarks-content {
    padding: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 20px;
}

.breadcrumb-text {
    color: #666;
}

.breadcrumb-path {
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.back-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.empty-state p {
    margin: 0 0 30px 0;
    font-size: 16px;
}

/* 技能树响应式设计 */
@media (max-width: 768px) {
    .skill-tree-section {
        padding: 20px;
        margin: 20px 0;
    }

    .skill-tree-section h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .root-categories {
        gap: 25px;
    }

    .skill-icon {
        width: 60px;
        height: 60px;
    }

    .skill-emoji {
        font-size: 24px;
    }

    .skill-level {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .skill-name {
        font-size: 12px;
        max-width: 80px;
    }

    .skill-tree-expanded {
        padding: 20px;
        min-height: 300px;
    }

    .child-skill .skill-icon {
        width: 50px;
        height: 50px;
    }

    .child-skill .skill-emoji {
        font-size: 20px;
    }

    .child-skill .skill-name {
        font-size: 11px;
        max-width: 70px;
    }

    .skill-tooltip {
        min-width: 180px;
        max-width: 250px;
        padding: 12px;
    }

    .tooltip-header h4 {
        font-size: 14px;
    }

    .tooltip-content p {
        font-size: 12px;
    }

    /* 分类树响应式 */
    .tree-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .categories-tree-section h3 {
        text-align: center;
        font-size: 20px;
    }

    .tree-controls {
        justify-content: center;
    }

    .tree-control-btn {
        font-size: 11px;
        padding: 6px 12px;
    }

    .category-main {
        padding: 15px;
        gap: 12px;
    }

    .category-toggle {
        padding: 15px 12px;
    }

    .category-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .root-category .category-icon {
        font-size: 16px;
    }

    .sub-category .category-icon {
        font-size: 14px;
    }

    .sub-sub-category .category-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .category-name {
        font-size: 16px;
    }

    .root-category .category-name {
        font-size: 16px;
    }

    .sub-category .category-name {
        font-size: 14px;
    }

    .sub-sub-category .category-name {
        font-size: 13px;
    }

    .category-path {
        font-size: 11px;
    }

    .bookmark-count {
        font-size: 10px;
        padding: 1px 6px;
    }

    .sub-category {
        margin-left: 20px;
    }

    .sub-subcategories {
        padding-left: 15px;
    }
}
